﻿using System.Collections.Generic;
using CoreShop.Model;

namespace CoreShop.Services
{
    /// <summary>
    /// 服务工厂接口
    /// </summary>
    public interface IcorecmsfooddesktagServices
    {
        #region 重写增删改查操作===========================================================

        /// <summary>
        /// 重写异步插入方法
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool InsertAsync(corecmsfooddesktag entity);
        bool UpdateDeskTag(long deskId);
        bool InsertOrUpdate(List<corecmsfooddesktag> entity);
        /// <summary>
        /// 重写异步更新方法
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool UpdateAsync(corecmsfooddesktag entity);

        /// <summary>
        /// 重写异步更新方法
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool UpdateAsync(List<corecmsfooddesktag> entity);

        /// <summary>
        /// 重写删除指定ID的数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteByIdAsync(long id);

        /// <summary>
        /// 重写删除指定ID集合的数据(批量删除)
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool DeleteByIdsAsync(int[] ids);

        #endregion

        #region 获取缓存的所有数据==========================================================

        /// <summary>
        /// 获取缓存的所有数据
        /// </summary>
        /// <returns></returns>
        List<corecmsfooddesktag> GetCaChe();

        #endregion

        #region 重写根据条件查询数据
        /// <summary>
        ///     重写根据条件查询分页数据
        /// </summary>
        List<corecmsfooddesktag> QueryAsync(long lastId);
        List<long> QueryDeskIdsAsync(long lastId);
        #endregion
    }
}
